

<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
  <meta charset="utf-8" />
  <meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  
  <title>JAEGER- DISTRIBUTED TRACING &mdash; Ceph Documentation</title>
  

  
  <link rel="stylesheet" href="../_static/ceph.css" type="text/css" />
  <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
  <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
  <link rel="stylesheet" href="../_static/ceph.css" type="text/css" />
  <link rel="stylesheet" href="../_static/graphviz.css" type="text/css" />
  <link rel="stylesheet" href="../_static/css/custom.css" type="text/css" />

  
  

  
  

  

  
  <!--[if lt IE 9]>
    <script src="../_static/js/html5shiv.min.js"></script>
  <![endif]-->
  
    
      <script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
        <script src="../_static/jquery.js"></script>
        <script src="../_static/_sphinx_javascript_frameworks_compat.js"></script>
        <script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
        <script src="../_static/doctools.js"></script>
        <script src="../_static/sphinx_highlight.js"></script>
    
    <script type="text/javascript" src="../_static/js/theme.js"></script>

    
    <link rel="index" title="Index" href="../genindex/" />
    <link rel="search" title="Search" href="../search/" />
    <link rel="next" title="Ceph 中文文档翻译资源" href="../translation_cn/" />
    <link rel="prev" title="Ceph 术语" href="../glossary/" /> 
</head>

<body class="wy-body-for-nav">

   
  <header class="top-bar">
    <div role="navigation" aria-label="Page navigation">
  <ul class="wy-breadcrumbs">
      <li><a href="../" class="icon icon-home" aria-label="Home"></a></li>
      <li class="breadcrumb-item active">JAEGER- DISTRIBUTED TRACING</li>
      <li class="wy-breadcrumbs-aside">
            <a href="../_sources/jaegertracing/index.rst.txt" rel="nofollow"> View page source</a>
      </li>
  </ul>
  <hr/>
</div>
  </header>
  <div class="wy-grid-for-nav">
    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search"  style="background: #eee" >
          

          
            <a href="../" class="icon icon-home"> Ceph
          

          
          </a>

          

          
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="../search/" method="get">
    <input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>

          
        </div>

        
        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
          
            
            
              
            
            
              <ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../start/">Ceph 简介</a></li>
<li class="toctree-l1"><a class="reference internal" href="../install/">安装 Ceph</a></li>
<li class="toctree-l1"><a class="reference internal" href="../cephadm/">Cephadm</a></li>
<li class="toctree-l1"><a class="reference internal" href="../rados/">Ceph 存储集群</a></li>
<li class="toctree-l1"><a class="reference internal" href="../cephfs/">Ceph 文件系统</a></li>
<li class="toctree-l1"><a class="reference internal" href="../rbd/">Ceph 块设备</a></li>
<li class="toctree-l1"><a class="reference internal" href="../radosgw/">Ceph 对象网关</a></li>
<li class="toctree-l1"><a class="reference internal" href="../mgr/">Ceph 管理器守护进程</a></li>
<li class="toctree-l1"><a class="reference internal" href="../mgr/dashboard/">Ceph 仪表盘</a></li>
<li class="toctree-l1"><a class="reference internal" href="../monitoring/">监控概览</a></li>
<li class="toctree-l1"><a class="reference internal" href="../api/">API 文档</a></li>
<li class="toctree-l1"><a class="reference internal" href="../architecture/">体系结构</a></li>
<li class="toctree-l1"><a class="reference internal" href="../dev/developer_guide/">开发者指南</a></li>
<li class="toctree-l1"><a class="reference internal" href="../dev/internals/">Ceph 内幕</a></li>
<li class="toctree-l1"><a class="reference internal" href="../governance/">项目管理</a></li>
<li class="toctree-l1"><a class="reference internal" href="../foundation/">Ceph 基金会</a></li>
<li class="toctree-l1"><a class="reference internal" href="../ceph-volume/">ceph-volume</a></li>
<li class="toctree-l1"><a class="reference internal" href="../releases/general/">Ceph 版本（总目录）</a></li>
<li class="toctree-l1"><a class="reference internal" href="../releases/">Ceph 版本（索引）</a></li>
<li class="toctree-l1"><a class="reference internal" href="../security/">Security</a></li>
<li class="toctree-l1"><a class="reference internal" href="../hardware-monitoring/">硬件监控</a></li>
<li class="toctree-l1"><a class="reference internal" href="../glossary/">Ceph 术语</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Tracing</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#basic-architecture-and-terminology">BASIC ARCHITECTURE AND TERMINOLOGY</a></li>
<li class="toctree-l2"><a class="reference internal" href="#jaeger-deployment">JAEGER DEPLOYMENT</a></li>
<li class="toctree-l2"><a class="reference internal" href="#cephadm-based-deployment-as-a-service">CEPHADM BASED DEPLOYMENT AS A SERVICE</a></li>
<li class="toctree-l2"><a class="reference internal" href="#manual-test-deployment-for-jaeger-opentelemetry-all-in-one-container">MANUAL TEST DEPLOYMENT FOR JAEGER OPENTELEMETRY ALL IN ONE CONTAINER</a></li>
<li class="toctree-l2"><a class="reference internal" href="#how-to-enable-tracing-in-ceph">HOW TO ENABLE TRACING IN CEPH</a></li>
<li class="toctree-l2"><a class="reference internal" href="#traces-in-rgw">TRACES IN RGW</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#requests">REQUESTS</a></li>
<li class="toctree-l3"><a class="reference internal" href="#multipart-upload">MULTIPART UPLOAD</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../translation_cn/">中文版翻译资源</a></li>
</ul>

            
          
        </div>
        
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" aria-label="top navigation">
        
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="../">Ceph</a>
        
      </nav>


      <div class="wy-nav-content">
        
        <div class="rst-content">
        
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
            
<div id="dev-warning" class="admonition note">
  <p class="first admonition-title">Notice</p>
  <p class="last">This document is for a development version of Ceph.</p>
</div>
  <div id="docubetter" align="right" style="padding: 5px; font-weight: bold;">
    <a href="https://pad.ceph.com/p/Report_Documentation_Bugs">Report a Documentation Bug</a>
  </div>

  
  <section id="jaeger-distributed-tracing">
<h1>JAEGER- DISTRIBUTED TRACING<a class="headerlink" href="#jaeger-distributed-tracing" title="Permalink to this heading"></a></h1>
<p>Jaeger provides ready-to-use tracing services for distributed systems.</p>
<section id="basic-architecture-and-terminology">
<h2>BASIC ARCHITECTURE AND TERMINOLOGY<a class="headerlink" href="#basic-architecture-and-terminology" title="Permalink to this heading"></a></h2>
<ul class="simple">
<li><p>TRACE: A trace shows the data/execution path through a system.</p></li>
<li><p>SPAN: A single unit of a trace. A data structure that stores information such
as the operation name, timestamps, and the ordering within a trace.</p></li>
<li><p>JAEGER CLIENT: Language-specific implementations of the OpenTracing API.</p></li>
<li><p>JAEGER AGENT: A daemon that listens for spans sent over User Datagram
Protocol. The agent is meant to be placed on the same host as the
instrumented application. (The Jaeger agent acts like a sidecar listener.)</p></li>
<li><p>JAEGER COLLECTOR: A daemon that receives spans sent by the Jaeger agent. The
Jaeger collector then stitches the spans together to form a trace. (A database
can be enabled to persist these traces).</p></li>
<li><p>JAEGER QUERY AND CONSOLE FRONTEND: The UI-based frontend that presents
reports of the jaeger traces. Accessible at  <a class="reference external" href="http:/">http:/</a>/&lt;jaeger frontend host&gt;:16686.</p></li>
</ul>
<p>Read more about jaeger tracing:.</p>
<blockquote>
<div><p><a class="reference external" href="https://www.jaegertracing.io/docs/">https://www.jaegertracing.io/docs/</a></p>
</div></blockquote>
</section>
<section id="jaeger-deployment">
<h2>JAEGER DEPLOYMENT<a class="headerlink" href="#jaeger-deployment" title="Permalink to this heading"></a></h2>
<p>Jaeger can be deployed using cephadm, or manually.</p>
</section>
<section id="cephadm-based-deployment-as-a-service">
<h2>CEPHADM BASED DEPLOYMENT AS A SERVICE<a class="headerlink" href="#cephadm-based-deployment-as-a-service" title="Permalink to this heading"></a></h2>
<p><a class="reference external" href="../cephadm/services/tracing/">Cephadm Jaeger Services Deployment</a></p>
</section>
<section id="manual-test-deployment-for-jaeger-opentelemetry-all-in-one-container">
<h2>MANUAL TEST DEPLOYMENT FOR JAEGER OPENTELEMETRY ALL IN ONE CONTAINER<a class="headerlink" href="#manual-test-deployment-for-jaeger-opentelemetry-all-in-one-container" title="Permalink to this heading"></a></h2>
<p>For single node testing Jaeger opentelemetry can be deployed using:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><style type="text/css">
span.prompt1:before {
  content: "$ ";
}
</style><span class="prompt1"><span class="w"> </span>docker<span class="w"> </span>run<span class="w"> </span>-d<span class="w"> </span>--name<span class="w"> </span>jaeger<span class="w"> </span><span class="se">\</span>
-e<span class="w"> </span><span class="nv">COLLECTOR_ZIPKIN_HOST_PORT</span><span class="o">=</span>:9411<span class="w"> </span><span class="se">\</span>
-e<span class="w"> </span><span class="nv">COLLECTOR_OTLP_ENABLED</span><span class="o">=</span><span class="nb">true</span><span class="w"> </span><span class="se">\</span>
-p<span class="w"> </span><span class="m">6799</span>:6799/udp<span class="w"> </span><span class="se">\</span>
-p<span class="w"> </span><span class="m">6832</span>:6832/udp<span class="w"> </span><span class="se">\</span>
-p<span class="w"> </span><span class="m">5778</span>:5778<span class="w"> </span><span class="se">\</span>
-p<span class="w"> </span><span class="m">16686</span>:16686<span class="w"> </span><span class="se">\</span>
-p<span class="w"> </span><span class="m">4317</span>:4317<span class="w"> </span><span class="se">\</span>
-p<span class="w"> </span><span class="m">4318</span>:4318<span class="w"> </span><span class="se">\</span>
-p<span class="w"> </span><span class="m">14250</span>:14250<span class="w"> </span><span class="se">\</span>
-p<span class="w"> </span><span class="m">14268</span>:14268<span class="w"> </span><span class="se">\</span>
-p<span class="w"> </span><span class="m">14269</span>:14269<span class="w"> </span><span class="se">\</span>
-p<span class="w"> </span><span class="m">9411</span>:9411<span class="w"> </span><span class="se">\</span>
jaegertracing/all-in-one:latest<span class="w"> </span>--processor.jaeger-compact.server-host-port<span class="o">=</span><span class="m">6799</span></span>
</pre></div></div><p><a class="reference external" href="https://www.jaegertracing.io/docs/1.25/deployment/">Jaeger Deployment</a></p>
<p><a class="reference external" href="https://www.jaegertracing.io/docs/1.25/performance-tuning/">Jaeger Performance Tuning</a></p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>The Jaeger agent must be running on each host (and not running in all-in-one
mode). This is because spans are sent to the local Jaeger agent. Spans of
hosts that do not have active Jaeger agents will be lost.</p>
<p>The default configured port for Jaeger agent differs from the official default
6831, since Ceph tracers are configured to send tracers to agents that listen
to port the configured 6799. Use the option “--processor.jaeger-compact.server-host-port=6799” for manual Jaeger
deployments.</p>
</div>
</section>
<section id="how-to-enable-tracing-in-ceph">
<h2>HOW TO ENABLE TRACING IN CEPH<a class="headerlink" href="#how-to-enable-tracing-in-ceph" title="Permalink to this heading"></a></h2>
<p>Tracing in Ceph is disabled by default.</p>
<p>Tracing can be enabled globally, and tracing can also be enabled separately for
each entity (for example, for rgw).</p>
<p>Enable tracing globally:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span class="prompt1">ceph<span class="w"> </span>config<span class="w"> </span><span class="nb">set</span><span class="w"> </span>global<span class="w"> </span>jaeger_tracing_enable<span class="w"> </span><span class="nb">true</span></span>
</pre></div></div><p>Enable tracing for each entity:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span class="prompt1">ceph<span class="w"> </span>config<span class="w"> </span><span class="nb">set</span><span class="w"> </span>&lt;entity&gt;<span class="w"> </span>jaeger_tracing_enable<span class="w"> </span><span class="nb">true</span></span>
</pre></div></div></section>
<section id="traces-in-rgw">
<h2>TRACES IN RGW<a class="headerlink" href="#traces-in-rgw" title="Permalink to this heading"></a></h2>
<p>Traces run on RGW can be found under the Service <cite>rgw</cite> in the Jaeger Frontend.</p>
<section id="requests">
<h3>REQUESTS<a class="headerlink" href="#requests" title="Permalink to this heading"></a></h3>
<p>Every user request is traced. Each trace contains tags for <cite>Operation name</cite>,
<cite>User id</cite>, <cite>Object name</cite> and <cite>Bucket name</cite>.</p>
<p>There is also an <cite>Upload id</cite> tag for Multipart upload operations.</p>
<p>The names of request traces have the following format: <cite>&lt;command&gt; &lt;transaction
id&gt;</cite>.</p>
</section>
<section id="multipart-upload">
<h3>MULTIPART UPLOAD<a class="headerlink" href="#multipart-upload" title="Permalink to this heading"></a></h3>
<p>There is a kind of trace that consists of a span for each request made by a
multipart upload, and it includes all <cite>Put Object</cite> requests.</p>
<p>The names of multipart traces have the following format: <cite>multipart_upload
&lt;upload id&gt;</cite>.</p>
<p>rgw service in Jaeger Frontend:</p>
<a class="reference internal image-reference" href="../_images/rgw_jaeger.png"><img alt="../_images/rgw_jaeger.png" src="../_images/rgw_jaeger.png" style="width: 400px;" /></a>
<p>osd service in Jaeger Frontend:</p>
<a class="reference internal image-reference" href="../_images/osd_jaeger.png"><img alt="../_images/osd_jaeger.png" src="../_images/osd_jaeger.png" style="width: 400px;" /></a>
</section>
</section>
</section>



<div id="support-the-ceph-foundation" class="admonition note">
  <p class="first admonition-title">Brought to you by the Ceph Foundation</p>
  <p class="last">The Ceph Documentation is a community resource funded and hosted by the non-profit <a href="https://ceph.io/en/foundation/">Ceph Foundation</a>. If you would like to support this and our other efforts, please consider <a href="https://ceph.io/en/foundation/join/">joining now</a>.</p>
</div>


           </div>
           
          </div>
          <footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
        <a href="../glossary/" class="btn btn-neutral float-left" title="Ceph 术语" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
        <a href="../translation_cn/" class="btn btn-neutral float-right" title="Ceph 中文文档翻译资源" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
    </div>

  <hr/>

  <div role="contentinfo">
    <p>&#169; Copyright 2016, Ceph authors and contributors. Licensed under Creative Commons Attribution Share Alike 3.0 (CC-BY-SA-3.0).</p>
  </div>

   

</footer>
        </div>
      </div>

    </section>

  </div>
  

  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.Navigation.enable(true);
      });
  </script>

  
  
    
   

</body>
</html>